//
//  ZStatusBottomView.swift
//  swift-weibo
//
//  Created by zero on 17/3/25.
//  Copyright © 2017年 zero. All rights reserved.
//

import UIKit

class ZStatusBottomView: UIView {


    override init(frame: CGRect) {
        super.init(frame: frame)
        
        //  布局
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    //  布局
    private func setupUI(){
        
        //  转发
        addSubview(btnRetweet)
        //  评论
        addSubview(btnComment)
        //  点赞
        addSubview(btnUnlike)
        
        let buttonW :CGFloat = UIScreen.main.bounds.size.width / 3
        
        btnRetweet.snp.makeConstraints { (make) in
            
            make.top.leading.bottom.equalTo(self)

            make.height.equalTo(35)
            make.width.equalTo(buttonW)
        }
        
    
        btnComment.snp.makeConstraints { (make) in
            
            make.top.bottom.equalTo(self)
            make.leading.equalTo(btnRetweet.snp.trailing)
            make.width.equalTo(btnRetweet)
        }
    
        
        btnUnlike.snp.makeConstraints { (make) in
            
            make.top.bottom.trailing.equalTo(self)
            make.width.equalTo(btnComment)
        }
        
    }
    

    //  创建按钮
    //  timeline_icon_retweet  timeline_icon_comment timeline_icon_unlike
     let btnRetweet = UIButton(title: "转发", fontColor: UIColor.darkGray, fontSize: 10, imageName: "timeline_icon_retweet", backImage: "timeline_card_bottom_background")
    
     let btnComment = UIButton(title: "评论", fontColor: UIColor.darkGray, fontSize: 10, imageName: "timeline_icon_comment", backImage: "timeline_card_bottom_background")
    
     let btnUnlike = UIButton(title: "点赞", fontColor: UIColor.darkGray, fontSize: 10, imageName: "timeline_icon_unlike", backImage: "timeline_card_bottom_background")

}
